//
//  ClinicalCollections.h
//  ClinicalCollections
//
//  Created by janakiraman gopinath on 12/28/12.
//  Copyright (c) 2012 GOPI. All rights reserved.
//

#import <Foundation/Foundation.h>
#define API_SUMMARY_URL @"http://api.lillycoi.com/v1/trials/search.json?query=cond:spondylitis,recr:open,count:500&fields=id,official_title,brief_title,condition,id_info,overall_status&limit="
#define API_BASE_URL @"http://api.lillycoi.com/v1/trials/search.json?query="

#define API_FIELD_PARAMS @"&fields="

#define API_EXHIBIT_URL @"http://api.lillycoi.com/v1/trials/search.exhibit?query="

#define CAPACITY_HINT 100

#define RESULTS_KEY @"results"
#define ID_KEY @"id"
#define ID_INFO_KEY @"id_info"
#define ORG_STUDY_ID_KEY @"org_study_id"
#define BRIEF_TITLE_KEY @"brief_title"
#define OFFICIAL_TITLE_KEY @"official_title"
#define CONDITION_KEY   @"condition"
#define OVERALL_STATUS_KEY @"overall_status"
#define LOCATION_KEY @"location"
#define GEODATA_KEY @"geodata"
#define OVERALL_STATUS @"overall_status"
// Need to define all the keys // TODO

#define DEFAULT_FETCH_LIMIT 1000

@interface ClinicalCollections : NSObject
{
    enum API_LEVEL {JSON, EXHIBIT};
    
}
// Helper methods
+ (NSArray *) getValueArrayFromCollections:(NSDictionary *) clinicalCollections usingLevelKey:(NSArray *) levelKeys forKey:keyName;

// Main method
+ (NSDictionary *) clinicalCollectionsQueryfetchWithLimit:(int) limit usingParameters:(NSDictionary *) parameters selectingFields:(NSArray *) fields;

+ (NSDictionary *) clinicalCollectionsQueryExhibitfetchWithLimit:(int) limit usingParameters:(NSDictionary *) parameters selectingFields:(NSArray *) fields;

@end
